<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:83:"D:\phpStudy\PHPTutorial\WWW\circle\public/../application/api\view\travel\oinfo.html";i:1518342960;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta charset="utf-8">
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
        <meta content="yes" name="apple-mobile-web-app-capable">
        <meta content="black" name="apple-mobile-web-app-status-bar-style">
        <meta content="telephone=no" name="format-detection">
        <title>行程详情</title>
        <link rel="stylesheet" href="/qz/assets/frozenui-1.3.0/css/frozen.css">
        <link rel="stylesheet" type="text/css" href="/qz/assets/css/style.css" />
        <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0Kqr2SMdguCrGLsMIPVLU457GLHEPgre"></script>
    </head>

    <body>
        <div id="map" >
            调用地图api
        </div>
        <?php if(is_array($travel['schedule']) || $travel['schedule'] instanceof \think\Collection || $travel['schedule'] instanceof \think\Paginator): $k = 0; $__LIST__ = $travel['schedule'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?>
        <section>
            <div class="day1">
                <i class="round round1"></i>
                <span><b>Day <?php echo $vo['days']; ?></b></span>
                <span class="marginL39"><?php echo $key; ?></span>
                <span class="floatR"><img src="/qz/assets/img/icon_map_27.png" class="icon_map"/></span>
            </div>
            <?php if(is_array($vo['activties']) || $vo['activties'] instanceof \think\Collection || $vo['activties'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['activties'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ac): $mod = ($i % 2 );++$i;?>
            <div class="tap tap1 body">
                <div class="row2_">
                    <i class="mark"><?php echo $ac['category_abbr']; ?></i>
                </div>
                <div class="row8_">
                    <p class="text_detail"><?php echo $ac['name']; ?></p>
                    <p>
                        <span class="zhushi">距离下一站<?php echo $ac['distance']; ?></span>
                        <a href="javascript:;" class="click_page" id="click<?php echo $k; ?>"><img src="/qz/assets/img/icon_up_blue.png" /><span>收起</span></a>
                    </p>
                </div> 
                <div style="clear: left;"></div> 
                <div class="ban1 ban detail_ban<?php echo $k; ?>">
                    <section class="marginT40">
                        <h4>活动流程</h4>
                        <div>
                        <?php if($type == 0): if(is_array($ac['plan']) || $ac['plan'] instanceof \think\Collection || $ac['plan'] instanceof \think\Paginator): $i = 0; $__LIST__ = $ac['plan'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                            <ul class="ui-row ui-whitespace">
                                <li class="ui-col ui-col-33 paddingR textAR fontS14 color696969 marginT20">
                                    <label class="ui-label"><?php echo $vo['time']; ?></label>
                                </li>
                                <li class="ui-col ui-col-67 textAL fontS14 color565656 lineH28 marginT20"><?php echo $vo['body']; ?></li>
                            </ul>
                            <?php endforeach; endif; else: echo "" ;endif; else: ?>
                            <?php echo $ac['plan']; endif; ?>
                        </div>
                    </section>  
                    <section class="tripDescription marginT40">
                        <h4>活动描述</h4>
                        <div class="marginT20">
                        <?php if($type == 0): if(is_array($ac['desc']) || $ac['desc'] instanceof \think\Collection || $ac['desc'] instanceof \think\Paginator): $i = 0; $__LIST__ = $ac['desc'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['type'] == 'img'): ?>
                                    <img src="<?php echo $vo['body']; ?>" class="img marginT15" />
                                <?php else: ?>
                                    <p class="marginT18 color565656 lineH28"><?php echo $vo['body']; ?></p>
                                <?php endif; endforeach; endif; else: echo "" ;endif; else: ?>
                            <?php echo $ac['desc']; endif; ?>
                        </div>
                    </section>  
                    <?php if($type == 0): ?>
                    <section class="tripDescription marginT40">
                        <h4>费用包含</h4>
                        <div class="marginT20">
                            <?php echo $ac['include']; ?>
                        </div>
                    </section>
                    <?php endif; ?>
                    <section class="tripDescription marginT40 marginB25">
                        <h4>活动须知</h4>
                        <div class="marginT20">
                            <?php echo $ac['notes']; ?>
                        </div>
                    </section> 
                </div>
            </div>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            </section>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        <section>
            <div class="day1 backgroundCT">
                <i class="round dayTop"></i>
                <span>THE END</span>
            </div>
        </section>
        <?php if($travel['other']): ?>
        <div class="tap body">
            <?php if(is_array($travel['other']) || $travel['other'] instanceof \think\Collection || $travel['other'] instanceof \think\Paginator): $i = 0; $__LIST__ = $travel['other'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): $mod = ($i % 2 );++$i;?>
            <div class="row2_">
                <img src="/qz/assets/img/icon_weixuan.png" class="mark marginT4 width15" />
            </div>
            <div class="row8_">
                <h2><?php echo $o['name']; ?><span class="money_yi floatR">¥<?php echo $o['fee']; ?></span></h2>
                <p class="marginT15">
                    <span class="zhushi"><?php echo $o['notes']; ?></span>
                </p>
            </div> 
            <div style="clear: left;"></div> 
            <?php endforeach; endif; else: echo "" ;endif; ?> 
        </div>
        <?php endif; ?>
        <div class="tap body say">
            <p class="">
                <span class="zhushi color969696">活动说明</span>
            </p>
            <p class="say_detail"><?php echo $travel['desc']; ?></p>
        </div>
        <?php if($travel['signuplist']): ?>
        <div class="tap body say marginB70">
            <h2>报名名单</h2>
            <ul id="signUp" class="marginT15 marginB25">
                <?php if(is_array($travel['signuplist']) || $travel['signuplist'] instanceof \think\Collection || $travel['signuplist'] instanceof \think\Paginator): $i = 0; $__LIST__ = $travel['signuplist'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$u): $mod = ($i % 2 );++$i;?>
                <li>
                    <img src="<?php echo $u['avatar']; ?>" />
                    <span><?php echo $u['name']; ?></span>
                    <span class="floatR"><?php echo $u['mobile']; ?></span>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
        <?php endif; ?>
      <!--   <footer class="footer">
          <a href="javascript:;" class="row2 textAC money_yi">票价：¥<?php echo $travel['memebr_price']; ?></a>
          <a href="javascript:;" class="row2 textAC baomin">立刻报名</a>
      </footer> -->
    <div style="margin-top: 100px">
        <h1>Objective-C和JavaScript交互的那些事</h1>
        <input type="button" value="CallCamera" onclick="Toyun.callCamera()">
    </div>      
    <div>
        <input type="button" value="Share" onclick="callShare()">
    </div>
    <div>
       <input type="button" value="CallCamera" onclick="callCamera()">
    </div>
     
        <script type="text/javascript" src="/qz/assets/js/jquery-1.11.3.min.js"></script>
        <script type="text/javascript" src="/qz/assets/js/script.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $('.click_page').each(function(i){
                    var index = i+1;
                    $("#click"+index).click(function(){
                        $(".detail_ban"+index).toggle();
                        console.log()
                        var showOrHide = $(".detail_ban"+index).css("display");
                        if(showOrHide=='none'){
                            $(this).find('span').text('展开');
                            $(this).find('img').addClass('rotate');
                        }else{
                            $(this).find('span').text('收起');
                            $(this).find('img').removeClass('rotate');
                        }
                        
                    });
                })
            });
        </script>
        <script type="text/javascript">
            var arr = <?php echo $maps; ?>;
            console.log(arr[0]);
            var map = new BMap.Map("map"); // 创建Map实例
            // map.centerAndZoom("中国",10);  
            for(j = 0,len=arr.length; j < len; j++) {
                var point = new BMap.Point(arr[j]['lon'],arr[j]['lat']);
                map.centerAndZoom(point, 5);
                var marker = new BMap.Marker(point);  // 创建标注
                map.addOverlay(marker);               // 将标注添加到地图中
                marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
            }

            function showInfo(e){
                alert('click map,与原生交互');
            }
            map.addEventListener("click", showInfo);
        </script>
        <script type="text/javascript">
            var callShare = function() {
            var shareInfo = JSON.stringify({"title": "标题", "desc": "内容", "shareUrl": "http://www.jianshu.com/p/f896d73c670a",
                "shareIco":"http://upload-images.jianshu.io/upload_images/1192353-fd26211d54aea8a9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"});
                Toyun.share(shareInfo);
            }
         
            var picCallback = function(photos) {
                alert(photos);
            }
             
            var shareCallback = function(){
                alert('success');
            }

            function callCamera() {
                var parentid = <?php echo $parentid; ?>;
                alert('这就交互了？？？来自parentid = '+parentid);
                window.location.href = 'toyun://callCamera';
            }
        </script>
    </body>
</html>